package com.zzit.vjv.util;

/**
 * 分页类
 * 
 * @author Administrator
 *
 */
public class Page {

	// 总条数
	private int totalCount;

	// 每页显示条数
	private int pageSize;

	// 当前页码
	private int currentPageNo;

	// 总页数
	private int totalPageCount;

	/**
	 * 
	 * @param totalCount
	 *            总条数
	 * @param pageSize
	 *            每页显示条数
	 * @param currentPageNo
	 *            当前页码
	 */
	public Page(int totalCount, int pageSize, int currentPageNo) {
		this.totalCount = totalCount;
		this.pageSize = pageSize;
		this.currentPageNo = currentPageNo;

		// 计算总页数
		this.totalPageCount = this.totalCount % this.pageSize == 0 ? this.totalCount / this.pageSize : this.totalCount / this.pageSize + 1;

	}

	public int getTotalCount() {
		return totalCount;
	}

	public void setTotalCount(int totalCount) {
		this.totalCount = totalCount;
	}

	public int getPageSize() {
		return pageSize;
	}

	public void setPageSize(int pageSize) {
		this.pageSize = pageSize;
	}

	public int getCurrentPageNo() {
		return currentPageNo;
	}

	public void setCurrentPageNo(int currentPageNo) {
		this.currentPageNo = currentPageNo;
	}

	public int getTotalPageCount() {
		return totalPageCount;
	}
}
